class MyArray<T>{
    public Object[] array=new Object[10];
    public T getPos(int pos){
        return (T)array[pos];
    }
    public void setVal(int pos,T val) {
        this.array[pos] = val;
    }
}
public class test {
    public static void main(String[] args) {
        MyArray<Integer> myArray=new MyArray<>();
        myArray.setVal(0,0);
        myArray.setVal(1,1);
        Integer s=myArray.getPos(1);
        System.out.println(s);
    }

}
